package cn.jtfadmin.base.lang.enums;

/**
 * 文件类型枚举
 *
 * @author akfh
 * @since 1.0
 */
public enum FileType {


    /**
     * 图片
     */
    IMAGE(new String[]{"bmp", "jpeg", "jpg", "png", "ico", "gif", "svg"}),

    /**
     * 音乐
     */
    MUSIC(new String[]{"mp3", "wma", "midi"}),

    /**
     * 视频
     */
    VIDEO(new String[]{"mp4", "avi", "rmvb", "rm", "flv", "mp4", "3gp"}),

    /**
     * excel
     */
    OFFICE_EXCEL(new String[]{"xls", "xlsx"}),

    /**
     * word
     */
    OFFICE_WORD(new String[]{"doc", "docx"}),

    /**
     * 文本
     */
    TEXT(new String[]{"txt", "conf", "html", "js", "css", "jsp", "xml", "htm"}),

    /**
     * ppt
     */
    PPT(new String[]{"ppt", "pptx"}),

    /**
     * 其他
     */
    OTHER(new String[]{"*"});

    private String[] allowedExtension;


    private FileType(String[] allowedExtension) {
        this.allowedExtension = allowedExtension;
    }

    public String[] getAllowedExtension() {
        return this.allowedExtension;
    }

}
